package com.example.demo.config;

import com.example.demo.config.interceptor.AutoInterceptor;
import com.example.demo.config.interceptor.ValidateLoginInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class AutoConfig implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new AutoInterceptor()).addPathPatterns("/milvus**");
        registry.addInterceptor(new ValidateLoginInterceptor()).addPathPatterns("/chat/**");
    }
}
